All Questions
Tagged with project-structurepython
18 questions
1vote
0answers
371views
How to structure your Python code with asynchronous and synchronous parts
I have a Python FastAPI server application which naturally guides you towards the asynchronous paradigm. For legacy reasons, I have to support two backends, one which is purely synchronous and one ...
0votes
1answer
335views
Should you add the name of the package to the module/package name in Python? [closed]
I'm looking for some best practices for readability (and clean code in general) for naming modules/classes within more extensive projects. More specifically, is it reasonable to add the package's name ...
2votes
2answers
209views
How should I structure an update script that handles the output of another module?
I have a large (>1,000 LOC) Python ETL script - call it fetch_and_transform_data.py - that fetches data from a remote database, appends the raw data to a local table, does some transformations and ...
0votes
1answer
218views
Where should research and production code reside in git?
We have research code that consists of Jupyter notebooks and large data files. At the same time, we also have production code that consists of Python source and CloudFormation templates. There is ...
1vote
1answer
226views
Improvement of the config file management
I am working on a personal project for more than 6 months now, this project is composed of three distinct parts, simulation (wrapping a software), database related stuff (store the simulated data in a ...
-2votes
2answers
1kviews
Best practice: keep DB models in one file or split into modules?
I've a Python project with ~30 SQLAlchemy models and I'm not sure where they belong. All models belong to the DB but also to a module, so I'm not sure about the right namespace. Here are some ideas: ...
0votes
1answer
590views
To structure big and expandable project(s)
TLDR with bold I want to create a library (I think this is the right term) for my own reinforcement learning environments (envs for short). Most of the envs would be based on self-implemented games ...
8votes
1answer
9kviews
What is a proper way to structure a Python project consisting of smaller packages that have shared code?
I have been debating this question internally for a few weeks now and I keep coming up short in finding a good answer to the question. I feel an example would be more descriptive than just talking ...
17votes
3answers
30kviews
best way to install local package into docker image
I have a python package that I wrote and I want to use it within multiple docker builds. However, I can't just install my local package situated outside of Dockerfile folder. And I don't want to ...
2votes
2answers
697views
What is the proper structure for maintaining single page python scripts
I am a self-taught programmer, and started my job as a PHP developer,in a small company. I then got some work to write python script. I didn't have any senior with proper Python experience. So I ...
5votes
1answer
5kviews
Where do you put the "main function" of a Python app?
Suppose you are developing a Python standalone application (not a library). Would you make it a Python package? Or just files next to each other? If you would make it a package, what would be the "...
2votes
1answer
814views
Structuring a Python Project: Need some guidance
I currently am working on a project that involves several discrete components that have some common functionality, and I am in need of some advice. Right now I have a central component responsible ...
1vote
1answer
469views
Multiple different versions of similar apps in one project
I need some help to improve the architecture of a site I've built. What I want to achieve within a single Django project is the following: I want a site that comes in several versions (one per year), ...
4votes
3answers
808views
How to structure project where a library and application using the library are concurrently developed?
I am planning to develop a new application that will heavily use a library that will be developed from scratch specifically for the application, but made general enough for it to be used for other ...
3votes
1answer
248views
Structure project based on platform or design?
I have a medium sized project (~10,000 lines) that runs on Windows and Linux. However it is only specific components of the program that are platform dependent and are located in a folder called ...